Vignette mgx2r - time serie

Marion Louveaux

2018-06-03

The goal of this vignette is to highlight the power of R and Plotly regarding the visualisation of time series.

Librairies

library(colorRamps)
library(dplyr)
library(plotly)
library(purrr)
library(mgx2r)

Data (all meshes from one individual)

Some .ply demonstration data coming from my PhD thesis are attached to this package and used here in the vignette. This dataset is a timelapse recording of the development of a WT shoot apical meristem expressing a membrane marker. I took one 3D stack every 12h and have 5 timepoints in total. Here I load the .ply and cell graph .ply for all the timepoints of this timelapse recording.

ply.dir <- system.file("extdata", "normalMesh/", package = "mgx2r")

mesh.all <- map(list.files(ply.dir, recursive = TRUE, full.names = TRUE),
                ~ read_mgxPly(file = .x, ShowSpecimen = FALSE))
#> [1] "Object has 7802 faces and 4180 vertices."
#> [1] "Object has 7689 faces and 4170 vertices."
#> [1] "Object has 6339 faces and 3455 vertices."
#> [1] "Object has 5731 faces and 3137 vertices."
#> [1] "Object has 6147 faces and 3354 vertices."


graph.dir <- system.file("extdata", "cellGraph/", package = "mgx2r")

cellGraph.all <- map(list.files(graph.dir, recursive = TRUE, full.names = TRUE), ~read_mgxCellGraph(fileCellGraph = .x, header_max = 30))

Plotly with slider

In plotly, the slider option allows to visualise several graphs linked by a time variable.

meshColors.all <- list(NULL, NULL, NULL, NULL, NULL)

plotlyMesh_all(meshExample = mesh.all,
                       graphExample = cellGraph.all,
                       meshColors = meshColors.all,
                       display = 'heatmap')